import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
import { routerArray } from './routes';

// 路由配置
export const router = createRouter({
  history: createWebHistory(import.meta.env.VITE_PUBLIC_PATH),  //根路径
  routes: routerArray as unknown as RouteRecordRaw[],
  strict: true,
  scrollBehavior: () => ({ left: 0, top: 0 }),
});